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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.u: B = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

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

c = A("c")
e = B("e")
d = C("d")
i = D("i")
f = E("f")
a = F("a")
j = G("j")
b = C("b")

c.o = f
c.y = f
c.s = a
c.w = j
e.z = j
e.x = f
e.s = i
e.u = a
d.t = j
d.z = b
d.u = e
d.v = f
i.x = d
f.p = j
f.y = e
a.r = d
a.p = j
a.u = j
j.v = f
b.t = j
b.z = d
b.u = e
b.v = f
assert f.p.v.p.v.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: E = None
        self.s: F = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.u: B = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

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

c = A("c")
e = B("e")
d = C("d")
i = D("i")
f = E("f")
a = F("a")
j = G("j")
b = C("b")

c.o = f
c.y = f
c.s = a
c.w = j
e.z = j
e.x = f
e.s = i
e.u = a
d.t = j
d.z = b
d.u = e
d.v = f
i.x = d
f.p = j
f.y = e
a.r = d
a.p = j
a.u = j
j.v = f
b.t = j
b.z = d
b.u = e
b.v = f
assert f.p.v.p.v.y.s.txt == "i"