class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

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

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

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

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

b.y = c
b.s = c
b.o = h
b.w = g
l.s = n
l.q = k
l.p = h
l.z = h
e.o = a
e.q = a
e.v = g
e.w = l
h.p = l
h.t = n
h.x = k
h.z = k
h.q = g
k.x = h
g.q = k
g.u = k
g.y = c
a.y = l
a.s = l
a.o = h
a.w = g
n.o = b
n.v = g
n.q = a
n.w = c
c.s = e
c.q = k
c.p = h
c.z = h
assert g.y.p.p.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.q: A = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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