class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: F = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: E = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: A = None
        self.w: D = None
        self.v: B = None
        self.z: G = None
        self.s: C = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

h = A("h")
f = B("f")
b = C("b")
g = D("g")
e = E("e")
n = F("n")
c = G("c")
k = E("k")
i = B("i")
d = C("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: E = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: A = None
        self.w: D = None
        self.v: B = None
        self.z: G = None
        self.s: C = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

h = A("h")
f = B("f")
b = C("b")
g = D("g")
e = E("e")
n = F("n")
c = G("c")
k = E("k")
i = B("i")
d = C("d")

h.o = c
h.r = n
h.w = n
h.u = n
f.u = e
f.o = i
f.t = n
f.w = c
f.p = c
f.q = c
f.z = c
b.q = g
b.r = k
g.x = n
g.z = n
g.r = n
g.q = k
e.r = c
e.z = c
e.p = h
e.x = h
e.w = g
e.v = i
e.s = b
n.q = d
c.u = i
k.r = c
k.z = c
k.p = h
k.x = h
k.w = g
k.v = f
k.s = d
i.u = k
i.o = f
i.t = n
i.w = c
i.p = c
i.q = c
i.z = c
d.q = g
d.r = e
assert i.o.o.t.txt == "n"