class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: B = None
        self.z: F = None
        self.r: H = None
        self.o: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: H = None
        self.w: A = None
        self.p: G = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: F = None
        self.u: C = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.z: C = None
        self.w: H = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.t: A = None
        self.u: F = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: H = None
        self.w: A = None
        self.p: G = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: F = None
        self.u: C = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.z: C = None
        self.w: H = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.t: A = None
        self.u: F = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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