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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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