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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: G = None
        self.s: B = None
        self.p: B = None
        self.o: D = None
        self.r: C = None
        self.u: E = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: C = None
        self.v: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: G = None
        self.s: B = None
        self.p: B = None
        self.o: D = None
        self.r: C = None
        self.u: E = None
        self.y: G = None
        self.txt = txt

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

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