class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.t: G = None
        self.y: C = None
        self.z: D = None
        self.u: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

a = A("a")
h = B("h")
j = C("j")
l = D("l")
d = E("d")
c = F("c")
b = G("b")
g = G("g")
f = A("f")

a.v = h
a.p = f
a.t = b
a.y = j
a.u = j
a.x = j
a.z = l
h.x = c
h.q = d
j.v = a
j.u = c
l.p = h
d.o = f
d.y = h
c.x = l
c.v = d
b.w = h
b.y = h
b.s = c
g.w = h
g.y = h
g.s = c
f.v = h
f.p = a
f.t = b
f.y = j
f.u = j
f.x = j
f.z = l
assert a.u.u.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.t: G = None
        self.y: C = None
        self.z: D = None
        self.u: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

a = A("a")
h = B("h")
j = C("j")
l = D("l")
d = E("d")
c = F("c")
b = G("b")
g = G("g")
f = A("f")

a.v = h
a.p = f
a.t = b
a.y = j
a.u = j
a.x = j
a.z = l
h.x = c
h.q = d
j.v = a
j.u = c
l.p = h
d.o = f
d.y = h
c.x = l
c.v = d
b.w = h
b.y = h
b.s = c
g.w = h
g.y = h
g.s = c
f.v = h
f.p = a
f.t = b
f.y = j
f.u = j
f.x = j
f.z = l
assert a.u.u.x.p.txt == "h"