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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: E = 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.o: A = None
        self.q: G = None
        self.x: B = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.txt = txt

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

i = A("i")
f = B("f")
d = C("d")
e = D("e")
a = E("a")
c = F("c")
n = G("n")
l = F("l")
h = C("h")
k = F("k")

i.u = e
i.p = a
i.w = a
i.z = a
i.r = l
f.t = d
f.y = c
f.x = k
f.u = e
d.y = h
d.u = a
e.z = a
a.o = i
a.q = n
a.x = f
a.v = l
a.y = e
c.z = i
c.w = a
n.s = f
n.y = l
l.z = i
l.w = a
h.y = d
h.u = a
k.z = i
k.w = a
assert a.q.y.w.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: E = None
        self.w: E = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.x: F = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: E = 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.o: A = None
        self.q: G = None
        self.x: B = None
        self.v: F = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.txt = txt

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

i = A("i")
f = B("f")
d = C("d")
e = D("e")
a = E("a")
c = F("c")
n = G("n")
l = F("l")
h = C("h")
k = F("k")

i.u = e
i.p = a
i.w = a
i.z = a
i.r = l
f.t = d
f.y = c
f.x = k
f.u = e
d.y = h
d.u = a
e.z = a
a.o = i
a.q = n
a.x = f
a.v = l
a.y = e
c.z = i
c.w = a
n.s = f
n.y = l
l.z = i
l.w = a
h.y = d
h.u = a
k.z = i
k.w = a
assert a.q.y.w.x.txt == "f"