class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.y: C = None
        self.s: B = None
        self.z: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: C = None
        self.u: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: C = None
        self.u: D = None
        self.w: A = None
        self.txt = txt

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

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