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

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.r: H = None
        self.z: D = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: G = None
        self.y: G = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.r: H = None
        self.z: D = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: G = None
        self.y: G = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.r: C = None
        self.txt = txt

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

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

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