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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

g.o = d
g.r = d
g.z = a
g.y = f
g.v = c
e.u = f
e.t = m
e.z = m
e.s = d
e.x = j
e.p = j
m.o = e
m.s = e
j.v = c
f.v = d
f.r = d
f.s = j
f.t = a
d.s = j
d.w = c
a.v = d
a.r = d
a.s = j
a.t = f
k.o = d
k.r = d
k.z = a
k.y = f
k.v = g
c.o = d
c.r = d
c.z = f
c.y = a
c.v = g
assert j.v.v.r.w.r.s.txt == "j"