class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: D = None
        self.z: C = None
        self.q: D = None
        self.r: E = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.r: E = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

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

d = A("d")
g = B("g")
h = C("h")
j = D("j")
m = E("m")
a = F("a")
k = A("k")
b = F("b")
e = F("e")
i = E("i")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.r: E = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

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

d = A("d")
g = B("g")
h = C("h")
j = D("j")
m = E("m")
a = F("a")
k = A("k")
b = F("b")
e = F("e")
i = E("i")

d.u = m
d.r = m
d.y = j
d.q = j
d.z = h
d.v = g
g.z = j
g.t = m
h.q = b
h.y = d
j.v = a
m.s = g
m.p = g
m.y = j
m.r = i
m.o = h
a.s = d
a.u = d
a.w = b
a.r = b
k.u = m
k.r = m
k.y = j
k.q = j
k.z = h
k.v = g
b.s = d
b.w = e
b.r = e
b.u = k
e.s = d
e.w = b
e.r = b
e.u = k
i.s = g
i.p = g
i.y = j
i.r = m
i.o = h
assert h.y.q.v.r.r.u.txt == "k"