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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.t: E = None
        self.txt = txt

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

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

b.z = m
b.t = m
b.y = m
b.o = j
b.w = j
b.v = j
b.p = h
i.r = h
i.v = h
i.y = f
i.w = c
i.s = m
c.p = i
c.w = f
c.o = f
c.y = b
c.z = m
c.s = j
m.s = f
m.y = h
m.u = h
m.t = i
m.q = c
h.o = i
j.u = i
j.q = i
j.t = h
f.t = j
assert h.o.w.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: F = None
        self.p: E = None
        self.t: D = None
        self.w: F = None
        self.y: D = None
        self.v: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: B = None
        self.t: E = None
        self.txt = txt

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

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

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