class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: F = None
        self.txt = txt

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

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

h = A("h")
m = B("m")
c = C("c")
a = D("a")
i = E("i")
l = F("l")
j = F("j")
f = C("f")

h.r = m
m.r = h
m.y = h
m.t = i
m.w = l
c.r = h
c.z = h
c.u = h
c.w = m
c.v = i
c.q = j
a.x = m
a.u = l
i.v = c
i.t = a
l.u = i
l.p = i
l.t = a
l.v = j
l.w = c
l.x = m
j.u = i
j.p = i
j.t = a
j.v = l
j.w = f
j.x = m
f.r = h
f.z = h
f.u = h
f.w = m
f.v = i
f.q = l
assert c.w.t.t.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: F = None
        self.txt = txt

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

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

h = A("h")
m = B("m")
c = C("c")
a = D("a")
i = E("i")
l = F("l")
j = F("j")
f = C("f")

h.r = m
m.r = h
m.y = h
m.t = i
m.w = l
c.r = h
c.z = h
c.u = h
c.w = m
c.v = i
c.q = j
a.x = m
a.u = l
i.v = c
i.t = a
l.u = i
l.p = i
l.t = a
l.v = j
l.w = c
l.x = m
j.u = i
j.p = i
j.t = a
j.v = l
j.w = f
j.x = m
f.r = h
f.z = h
f.u = h
f.w = m
f.v = i
f.q = l
assert c.w.t.t.u.v.txt == "j"