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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

d = A("d")
a = B("a")
j = C("j")
g = D("g")
k = E("k")
f = F("f")
c = C("c")
i = B("i")
h = A("h")

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

d = A("d")
a = B("a")
j = C("j")
g = D("g")
k = E("k")
f = F("f")
c = C("c")
i = B("i")
h = A("h")

d.x = k
d.r = k
d.p = h
d.z = g
d.o = f
d.y = f
a.u = d
a.t = g
a.y = k
a.x = k
a.r = h
j.s = f
g.s = k
k.y = c
k.u = g
f.s = c
f.t = c
f.y = h
f.u = j
c.s = f
i.u = d
i.t = g
i.y = k
i.x = k
i.r = h
h.x = k
h.r = k
h.p = d
h.z = g
h.o = f
h.y = f
assert d.x.u.s.u.txt == "g"