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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.u: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.txt = txt

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

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

m = A("m")
a = B("a")
n = C("n")
c = D("c")
b = E("b")
k = F("k")
i = G("i")
h = G("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.u: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.txt = txt

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

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

m = A("m")
a = B("a")
n = C("n")
c = D("c")
b = E("b")
k = F("k")
i = G("i")
h = G("h")

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