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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: G = None
        self.o: C = None
        self.z: A = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: E = None
        self.z: A = None
        self.t: D = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.v: G = None
        self.p: B = None
        self.s: G = None
        self.r: B = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

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

c.v = j
c.t = m
c.x = m
c.o = m
c.r = d
c.p = l
c.w = l
l.u = c
l.z = c
l.y = c
l.q = c
l.t = k
l.o = j
j.p = d
j.v = d
j.r = b
j.q = b
j.z = c
j.t = m
m.u = h
m.v = h
m.s = h
m.z = k
m.p = l
m.r = l
m.y = c
b.y = j
b.q = d
d.p = m
d.u = b
d.q = b
h.t = k
k.t = h
assert b.q.q.q.q.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.r: F = None
        self.x: D = None
        self.p: B = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: G = None
        self.o: C = None
        self.z: A = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: E = None
        self.z: A = None
        self.t: D = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.v: G = None
        self.p: B = None
        self.s: G = None
        self.r: B = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

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

c.v = j
c.t = m
c.x = m
c.o = m
c.r = d
c.p = l
c.w = l
l.u = c
l.z = c
l.y = c
l.q = c
l.t = k
l.o = j
j.p = d
j.v = d
j.r = b
j.q = b
j.z = c
j.t = m
m.u = h
m.v = h
m.s = h
m.z = k
m.p = l
m.r = l
m.y = c
b.y = j
b.q = d
d.p = m
d.u = b
d.q = b
h.t = k
k.t = h
assert b.q.q.q.q.y.txt == "j"