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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: D = None
        self.y: A = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
m = C("m")
c = D("c")
i = E("i")
j = F("j")
g = G("g")
e = D("e")
h = C("h")
n = B("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: D = None
        self.y: A = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

k = A("k")
b = B("b")
m = C("m")
c = D("c")
i = E("i")
j = F("j")
g = G("g")
e = D("e")
h = C("h")
n = B("n")

k.s = e
k.p = h
k.x = j
b.o = n
m.v = e
m.p = c
m.x = c
m.y = k
m.t = i
c.t = g
c.x = k
c.z = j
c.q = m
i.w = g
i.v = g
i.q = g
j.v = i
j.z = k
j.t = c
g.t = n
g.u = i
e.t = g
e.x = k
e.z = j
e.q = h
h.v = e
h.x = e
h.p = c
h.y = k
h.t = i
n.o = b
assert b.o.o.o.o.o.o.txt == "b"