class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: B = None
        self.u: E = None
        self.v: F = None
        self.p: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: H = None
        self.z: A = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: B = None
        self.u: E = None
        self.v: F = None
        self.p: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: H = None
        self.z: A = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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