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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.v: G = None
        self.p: B = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.v: F = None
        self.y: C = None
        self.txt = txt

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

i.w = c
i.o = m
b.v = c
b.x = i
b.o = m
l.w = b
l.s = i
l.x = i
j.v = k
j.s = i
m.t = b
m.p = b
m.x = l
m.v = c
m.o = i
f.t = l
c.w = i
c.x = m
c.v = f
c.y = l
k.w = i
k.x = m
k.v = f
k.y = l
assert m.o.w.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.v: G = None
        self.p: B = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.v: F = None
        self.y: C = None
        self.txt = txt

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

i.w = c
i.o = m
b.v = c
b.x = i
b.o = m
l.w = b
l.s = i
l.x = i
j.v = k
j.s = i
m.t = b
m.p = b
m.x = l
m.v = c
m.o = i
f.t = l
c.w = i
c.x = m
c.v = f
c.y = l
k.w = i
k.x = m
k.v = f
k.y = l
assert m.o.w.x.v.txt == "c"