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

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

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

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

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

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

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

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

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

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

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

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

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

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

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