class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.r: C = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.p: D = None
        self.q: B = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.u: D = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.p: D = None
        self.q: B = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.u: D = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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