class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: E = None
        self.o: C = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.txt = txt

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

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