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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.r: C = None
        self.s: A = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: E = None
        self.z: E = None
        self.s: B = None
        self.o: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.r: C = None
        self.s: A = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: E = None
        self.z: E = None
        self.s: B = None
        self.o: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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