class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: C = None
        self.p: C = None
        self.s: D = None
        self.x: C = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.txt = txt

h = A("h")
i = B("i")
l = C("l")
d = D("d")
j = E("j")
g = F("g")
b = G("b")
c = E("c")
a = F("a")

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: C = None
        self.p: C = None
        self.s: D = None
        self.x: C = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.txt = txt

h = A("h")
i = B("i")
l = C("l")
d = D("d")
j = E("j")
g = F("g")
b = G("b")
c = E("c")
a = F("a")

h.u = i
i.y = l
i.q = d
i.r = b
l.p = d
l.v = d
l.o = a
l.y = c
d.w = a
j.x = c
j.w = c
j.t = c
j.q = d
j.s = d
g.v = b
g.y = b
g.q = l
g.p = l
g.x = l
g.s = d
g.t = d
b.y = g
b.q = l
c.x = j
c.w = j
c.t = j
c.q = d
c.s = d
a.v = b
a.y = b
a.q = l
a.p = l
a.x = l
a.s = d
a.t = d
assert i.q.w.t.w.t.w.v.txt == "b"