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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: C = None
        self.r: H = None
        self.w: C = None
        self.x: D = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: G = None
        self.x: D = None
        self.z: D = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.t: B = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

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

i = A("i")
k = B("k")
l = C("l")
c = D("c")
f = E("f")
j = F("j")
e = G("e")
h = H("h")
d = B("d")
b = G("b")

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: C = None
        self.r: H = None
        self.w: C = None
        self.x: D = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: G = None
        self.x: D = None
        self.z: D = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.t: B = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

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

i = A("i")
k = B("k")
l = C("l")
c = D("c")
f = E("f")
j = F("j")
e = G("e")
h = H("h")
d = B("d")
b = G("b")

i.z = l
i.w = l
i.y = e
k.t = h
k.r = h
k.p = l
k.w = l
k.x = c
k.q = e
l.v = i
l.r = b
c.z = f
f.y = h
f.r = b
f.x = c
f.z = c
f.v = l
f.u = d
j.z = c
j.y = h
j.t = k
j.v = i
e.x = i
e.w = l
e.r = f
e.y = j
h.v = i
h.r = i
h.u = d
h.z = f
h.y = f
h.p = c
d.t = h
d.r = h
d.p = l
d.w = l
d.x = c
d.q = e
b.x = i
b.w = l
b.r = f
b.y = j
assert b.w.r.r.u.x.z.txt == "f"