class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.r: E = None
        self.w: D = None
        self.t: H = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: E = None
        self.s: E = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.z: A = None
        self.x: E = None
        self.t: A = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.p: F = None
        self.w: G = None
        self.y: E = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: E = None
        self.s: E = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.z: A = None
        self.x: E = None
        self.t: A = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.p: F = None
        self.w: G = None
        self.y: E = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

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

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