class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: E = None
        self.r: E = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.r: G = None
        self.o: G = None
        self.t: C = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.r: G = None
        self.o: G = None
        self.t: C = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: B = None
        self.txt = txt

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

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