class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: G = None
        self.v: E = None
        self.u: C = None
        self.q: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: B = None
        self.z: D = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

b = A("b")
c = B("c")
k = C("k")
n = D("n")
h = E("h")
f = F("f")
l = G("l")
j = C("j")
g = F("g")

b.x = h
b.v = h
b.t = l
b.q = l
b.u = k
c.o = k
c.v = h
k.t = c
k.x = b
k.z = n
n.r = l
n.p = c
n.t = c
n.v = c
n.z = h
n.q = j
n.y = g
h.o = f
f.z = c
f.o = l
l.o = g
l.r = c
l.z = n
l.p = n
l.s = f
j.t = c
j.x = b
j.z = n
g.z = c
g.o = l
assert j.z.p.o.t.v.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: G = None
        self.v: E = None
        self.u: C = None
        self.q: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: B = None
        self.z: D = None
        self.s: F = None
        self.p: D = None
        self.txt = txt

b = A("b")
c = B("c")
k = C("k")
n = D("n")
h = E("h")
f = F("f")
l = G("l")
j = C("j")
g = F("g")

b.x = h
b.v = h
b.t = l
b.q = l
b.u = k
c.o = k
c.v = h
k.t = c
k.x = b
k.z = n
n.r = l
n.p = c
n.t = c
n.v = c
n.z = h
n.q = j
n.y = g
h.o = f
f.z = c
f.o = l
l.o = g
l.r = c
l.z = n
l.p = n
l.s = f
j.t = c
j.x = b
j.z = n
g.z = c
g.o = l
assert j.z.p.o.t.v.o.o.txt == "l"