class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.w: B = None
        self.p: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.q: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.q: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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