class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.v: A = None
        self.q: C = None
        self.r: E = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.txt = txt

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

h.v = b
j.r = l
j.s = h
j.w = i
b.o = j
b.t = i
c.x = d
c.t = b
c.s = i
k.o = c
k.x = b
k.q = b
k.v = h
k.u = h
k.r = d
k.w = j
f.u = l
e.v = f
e.w = l
d.o = c
d.x = b
d.q = b
d.v = h
d.u = h
d.r = k
d.w = j
i.r = l
i.s = h
i.w = j
l.v = f
l.w = e
assert c.t.o.r.w.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.v: A = None
        self.q: C = None
        self.r: E = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.txt = txt

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

h.v = b
j.r = l
j.s = h
j.w = i
b.o = j
b.t = i
c.x = d
c.t = b
c.s = i
k.o = c
k.x = b
k.q = b
k.v = h
k.u = h
k.r = d
k.w = j
f.u = l
e.v = f
e.w = l
d.o = c
d.x = b
d.q = b
d.v = h
d.u = h
d.r = k
d.w = j
i.r = l
i.s = h
i.w = j
l.v = f
l.w = e
assert c.t.o.r.w.v.u.txt == "l"