class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: I = None
        self.t: I = None
        self.r: A = None
        self.u: C = None
        self.o: C = None
        self.z: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.t: I = None
        self.y: I = None
        self.x: C = None
        self.o: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.v: G = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.p: B = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.r: E = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.y: B = None
        self.p: C = None
        self.z: A = None
        self.s: E = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

n = A("n")
c = B("c")
h = C("h")
e = D("e")
f = E("f")
a = F("a")
b = G("b")
g = H("g")
l = I("l")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: I = None
        self.t: I = None
        self.r: A = None
        self.u: C = None
        self.o: C = None
        self.z: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.t: I = None
        self.y: I = None
        self.x: C = None
        self.o: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.v: G = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.p: B = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.r: E = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.y: B = None
        self.p: C = None
        self.z: A = None
        self.s: E = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

n = A("n")
c = B("c")
h = C("h")
e = D("e")
f = E("f")
a = F("a")
b = G("b")
g = H("g")
l = I("l")
j = J("j")

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