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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.u: A = None
        self.t: A = None
        self.p: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.p: A = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
e = C("e")
l = D("l")
g = E("g")
b = F("b")
c = B("c")
j = C("j")
h = A("h")

i.v = b
i.z = h
i.q = e
n.w = g
n.s = g
n.z = l
n.p = l
n.u = i
n.t = i
e.r = h
e.z = j
l.u = g
l.w = g
l.r = n
l.p = i
l.y = b
g.r = e
g.u = l
g.x = b
b.u = n
b.v = l
b.x = g
c.w = g
c.s = g
c.z = l
c.p = l
c.u = h
c.t = i
j.r = i
j.z = e
h.v = b
h.z = i
h.q = j
assert b.u.z.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.u: A = None
        self.t: A = None
        self.p: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.p: A = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
e = C("e")
l = D("l")
g = E("g")
b = F("b")
c = B("c")
j = C("j")
h = A("h")

i.v = b
i.z = h
i.q = e
n.w = g
n.s = g
n.z = l
n.p = l
n.u = i
n.t = i
e.r = h
e.z = j
l.u = g
l.w = g
l.r = n
l.p = i
l.y = b
g.r = e
g.u = l
g.x = b
b.u = n
b.v = l
b.x = g
c.w = g
c.s = g
c.z = l
c.p = l
c.u = h
c.t = i
j.r = i
j.z = e
h.v = b
h.z = i
h.q = j
assert b.u.z.w.u.txt == "l"