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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.u: D = None
        self.x: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.y: D = None
        self.v: C = None
        self.s: B = None
        self.txt = txt

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

m = A("m")
e = B("e")
l = C("l")
f = D("f")
c = E("c")
h = F("h")
i = G("i")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.u: D = None
        self.x: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.y: D = None
        self.v: C = None
        self.s: B = None
        self.txt = txt

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

m = A("m")
e = B("e")
l = C("l")
f = D("f")
c = E("c")
h = F("h")
i = G("i")

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