class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: H = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.v: G = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: G = None
        self.p: E = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: H = None
        self.y: B = None
        self.t: F = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.v: G = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: G = None
        self.p: E = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: H = None
        self.y: B = None
        self.t: F = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.z: F = None
        self.txt = txt

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

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