class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.w: D = None
        self.r: D = None
        self.p: D = None
        self.q: D = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: H = None
        self.y: H = None
        self.v: G = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.v: C = None
        self.x: G = None
        self.o: F = None
        self.p: F = None
        self.y: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: H = None
        self.y: H = None
        self.v: G = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.v: C = None
        self.x: G = None
        self.o: F = None
        self.p: F = None
        self.y: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: H = None
        self.txt = txt

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

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

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

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