class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.t: D = None
        self.v: E = None
        self.q: A = None
        self.s: D = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: A = None
        self.s: D = None
        self.o: F = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.o: B = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.t: D = None
        self.v: E = None
        self.q: A = None
        self.s: D = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: A = None
        self.s: D = None
        self.o: F = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.o: B = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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

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