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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: C = None
        self.r: C = None
        self.z: I = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.q: F = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: B = None
        self.p: A = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

m = A("m")
j = B("j")
e = C("e")
n = D("n")
g = E("g")
l = F("l")
i = G("i")
h = H("h")
a = I("a")
c = F("c")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: C = None
        self.r: C = None
        self.z: I = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.q: F = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: B = None
        self.p: A = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

m = A("m")
j = B("j")
e = C("e")
n = D("n")
g = E("g")
l = F("l")
i = G("i")
h = H("h")
a = I("a")
c = F("c")

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