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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.p: F = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: B = None
        self.t: C = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.u: E = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

m = A("m")
i = B("i")
b = C("b")
f = D("f")
j = E("j")
e = F("e")
l = C("l")
g = D("g")
k = B("k")

m.u = f
m.z = e
i.z = l
i.q = e
i.p = e
i.t = m
b.y = k
b.x = k
b.r = m
f.q = l
f.r = i
f.t = b
f.s = m
f.p = m
j.q = k
j.v = i
e.v = m
e.s = m
e.t = m
e.u = j
e.o = j
l.y = k
l.x = i
l.r = m
g.q = b
g.r = k
g.t = l
g.s = m
g.p = m
k.z = b
k.q = e
k.p = e
k.t = m
assert f.r.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.p: F = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: B = None
        self.t: C = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.u: E = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

m = A("m")
i = B("i")
b = C("b")
f = D("f")
j = E("j")
e = F("e")
l = C("l")
g = D("g")
k = B("k")

m.u = f
m.z = e
i.z = l
i.q = e
i.p = e
i.t = m
b.y = k
b.x = k
b.r = m
f.q = l
f.r = i
f.t = b
f.s = m
f.p = m
j.q = k
j.v = i
e.v = m
e.s = m
e.t = m
e.u = j
e.o = j
l.y = k
l.x = i
l.r = m
g.q = b
g.r = k
g.t = l
g.s = m
g.p = m
k.z = b
k.q = e
k.p = e
k.t = m
assert f.r.t.u.txt == "f"