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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: B = None
        self.q: E = None
        self.y: E = None
        self.t: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.v: B = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: B = None
        self.q: E = None
        self.y: E = None
        self.t: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.v: B = None
        self.o: B = None
        self.txt = txt

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

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