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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

c.t = j
c.v = j
c.s = j
c.y = n
c.p = e
c.z = g
n.v = i
j.z = c
j.u = f
j.q = f
j.r = i
j.t = l
j.s = n
l.t = c
f.z = l
f.o = l
f.w = m
f.v = h
f.y = c
i.s = g
i.u = f
i.q = f
g.s = i
g.u = f
g.q = f
h.v = g
m.z = e
m.u = f
m.q = f
m.r = i
m.t = l
m.s = n
e.t = m
e.y = h
e.p = c
e.v = j
e.s = j
e.z = g
assert f.z.t.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: B = None
        self.p: A = None
        self.v: C = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

c.t = j
c.v = j
c.s = j
c.y = n
c.p = e
c.z = g
n.v = i
j.z = c
j.u = f
j.q = f
j.r = i
j.t = l
j.s = n
l.t = c
f.z = l
f.o = l
f.w = m
f.v = h
f.y = c
i.s = g
i.u = f
i.q = f
g.s = i
g.u = f
g.q = f
h.v = g
m.z = e
m.u = f
m.q = f
m.r = i
m.t = l
m.s = n
e.t = m
e.y = h
e.p = c
e.v = j
e.s = j
e.z = g
assert f.z.t.p.z.txt == "g"