class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.r: G = None
        self.y: D = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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