class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.v: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.w: C = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.v: B = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.w: C = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: E = None
        self.v: B = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

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