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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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