class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.s: D = None
        self.u: E = None
        self.t: B = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: F = None
        self.z: A = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

l = A("l")
c = B("c")
n = C("n")
f = D("f")
k = E("k")
a = F("a")
b = G("b")
j = B("j")
e = F("e")
g = A("g")

l.x = a
l.w = f
l.s = f
l.y = f
l.u = k
l.r = k
l.t = c
c.w = g
n.o = c
f.w = k
f.q = k
f.x = n
k.r = f
k.x = e
k.z = l
k.p = n
a.y = l
a.q = g
a.r = f
a.u = c
b.p = j
j.w = g
e.y = l
e.q = l
e.r = f
e.u = j
g.x = a
g.w = f
g.s = f
g.y = f
g.u = k
g.r = k
g.t = c
assert f.x.o.w.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: D = None
        self.s: D = None
        self.u: E = None
        self.t: B = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: F = None
        self.z: A = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

l = A("l")
c = B("c")
n = C("n")
f = D("f")
k = E("k")
a = F("a")
b = G("b")
j = B("j")
e = F("e")
g = A("g")

l.x = a
l.w = f
l.s = f
l.y = f
l.u = k
l.r = k
l.t = c
c.w = g
n.o = c
f.w = k
f.q = k
f.x = n
k.r = f
k.x = e
k.z = l
k.p = n
a.y = l
a.q = g
a.r = f
a.u = c
b.p = j
j.w = g
e.y = l
e.q = l
e.r = f
e.u = j
g.x = a
g.w = f
g.s = f
g.y = f
g.u = k
g.r = k
g.t = c
assert f.x.o.w.x.txt == "a"