class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: F = None
        self.y: F = None
        self.s: B = None
        self.v: G = None
        self.z: H = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.z: G = None
        self.s: C = None
        self.v: C = None
        self.w: F = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.z: G = None
        self.s: C = None
        self.v: C = None
        self.w: F = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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