class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: H = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: D = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: F = None
        self.x: H = None
        self.p: F = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.s: A = None
        self.x: A = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: D = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: F = None
        self.x: H = None
        self.p: F = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.s: A = None
        self.x: A = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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