class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: B = None
        self.t: C = None
        self.s: F = None
        self.z: B = None
        self.q: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

h = A("h")
j = B("j")
f = C("f")
d = D("d")
k = E("k")
l = F("l")
a = G("a")
b = G("b")
m = D("m")
g = E("g")

h.v = m
h.o = j
h.z = j
h.q = j
h.t = f
h.p = f
h.s = l
j.x = a
f.x = h
f.v = h
d.w = m
k.w = h
l.y = j
l.o = m
l.x = f
l.p = f
a.u = l
a.t = h
b.u = l
b.t = h
m.w = d
g.w = h
assert f.v.p.x.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: B = None
        self.t: C = None
        self.s: F = None
        self.z: B = None
        self.q: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

h = A("h")
j = B("j")
f = C("f")
d = D("d")
k = E("k")
l = F("l")
a = G("a")
b = G("b")
m = D("m")
g = E("g")

h.v = m
h.o = j
h.z = j
h.q = j
h.t = f
h.p = f
h.s = l
j.x = a
f.x = h
f.v = h
d.w = m
k.w = h
l.y = j
l.o = m
l.x = f
l.p = f
a.u = l
a.t = h
b.u = l
b.t = h
m.w = d
g.w = h
assert f.v.p.x.s.y.txt == "j"