class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

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

h = A("h")
g = B("g")
c = C("c")
f = D("f")
j = E("j")
l = F("l")
b = A("b")
k = E("k")
n = B("n")

h.z = j
g.v = j
g.p = j
g.t = f
g.s = k
g.u = l
c.w = b
c.x = b
c.s = f
c.p = h
c.q = l
f.t = h
f.w = n
f.q = n
f.v = l
f.y = l
j.o = f
j.x = c
j.q = h
j.t = h
j.s = k
j.r = l
l.q = h
l.x = h
l.s = f
b.z = k
k.o = f
k.x = c
k.q = h
k.t = h
k.s = j
k.r = l
n.v = j
n.s = j
n.p = j
n.t = f
n.u = l
assert k.t.z.o.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

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

h = A("h")
g = B("g")
c = C("c")
f = D("f")
j = E("j")
l = F("l")
b = A("b")
k = E("k")
n = B("n")

h.z = j
g.v = j
g.p = j
g.t = f
g.s = k
g.u = l
c.w = b
c.x = b
c.s = f
c.p = h
c.q = l
f.t = h
f.w = n
f.q = n
f.v = l
f.y = l
j.o = f
j.x = c
j.q = h
j.t = h
j.s = k
j.r = l
l.q = h
l.x = h
l.s = f
b.z = k
k.o = f
k.x = c
k.q = h
k.t = h
k.s = j
k.r = l
n.v = j
n.s = j
n.p = j
n.t = f
n.u = l
assert k.t.z.o.q.t.txt == "f"